﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<GabageFactory.Models.User>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	修改用户信息
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>修改用户信息</h2>

    <% using (Html.BeginForm()) {%>
        <%: Html.ValidationSummary(true) %>
        
        <fieldset>
            <legend>用户详细信息</legend>
            
            <%: Html.HiddenFor(model => model.Id) %>
            
            <div class="editor-label">
                所属堆场
            </div>
            <div class="editor-field">
                <%: Html.DropDownList("FactoryId", ViewData["factories"] as List<SelectListItem>, "请选择公司")%>
            </div>

            <div class="editor-label">
                用户角色
            </div>
            <div class="editor-field">
                <%: Html.DropDownList("RoleId", ViewData["roles"] as List<SelectListItem>, "请选择角色")%>
            </div>
            
            <div class="editor-label">
                用户名称
            </div>
            <div class="editor-field">
                <%: Html.HiddenFor(model => model.Name) %>
                <%: Html.DisplayTextFor(model => model.Name) %>
            </div>
            

            <div class="editor-label">
                固定电话
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Phone) %>
                <%: Html.ValidationMessageFor(model => model.Phone) %>
            </div>

            <div class="editor-label">
                手机号码
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Mobile) %>
                <%: Html.ValidationMessageFor(model => model.Mobile) %>
            </div>

            <div class="editor-label">
                电子邮箱
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Email) %>
                <%: Html.ValidationMessageFor(model => model.Email) %>
            </div>
            
            <p>
                <input type="submit" value="提  交" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%: Html.ActionLink("返回列表", "Index") %>
    </div>

</asp:Content>

